home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
TECHNICA
/
COMPUTER
/
H254.ZIP
/
IRITSM3S.ZIP
/
IRIT
/
SOLID8H.IRT
< prev
next >
Wrap
Text File
|
1991-09-04
|
894b
|
45 lines
#
# Yet another simple 3D mechanical object.
#
# Created by Gershon Elber, Sep 89
#
save_mat = view_mat;
save_res = resolution;
resolution = 32;
view_mat = view_mat * trans(vector(0.0, -0.3, 0.0)) *
scale(vector(0.8, 0.8, 0.8));
b1 = box(vector(-0.6, -0.3, 0.0), 1.2, 0.6, 0.6);
c1 = cylin(vector(0.0, -0.25, 0.59), vector(0.0, 0.5, 0.0), 0.55);
s1 = b1 + c1;
color(s1, yellow);
free(b1);
free(c1);
view(list(s1), true);
b2 = box(vector(-0.4, -0.4, -0.1), 0.8, 0.8, 0.35);
view(list(b2), false);
s2 = s1 - b2;
free(s1);
free(b2);
color(s2, yellow);
view(list(s2), true);
c2 = cylin(vector(0.0, -0.4, 0.595), vector(0.0, 0.8, 0.0), 0.3);
view(list(c2), false);
s3 = s2 - c2;
free(s2);
free(c2);
final = convex(s3);
interact(list(s3), true);
save("solid8", list(view_mat,final));
free(final);
resolution = save_res;
view_mat = save_mat;